package chapter06

object Demo04_ClassForAccess {

}

//定义一个父类
class Person {
  private var idCard: String = "111111"
  protected var name: String = "alice"
  var sex: String = "female"
  private [chapter06] var age: Int = 18

  def printInfo(): Unit = {
    println(s"Person: $idCard $name $age $sex")
  }
}